package
{
	import mx.controls.DataGrid;
	import mx.controls.dataGridClasses.DataGridItemRenderer;

	public class DataGridItemRendererColorFull extends DataGridItemRenderer
	{
		public function DataGridItemRendererColorFull()
		{
			super();
		}
		override public function validateNow():void
		{
			if(listData)
			{
				var item:Object = null;
				try
				{
					item = listData.owner["dataProvider"][listData.rowIndex];
				}
				catch(e:Error)
				{
					trace(e);
				}
				
				if(item != null)
				{
					if(item.hasOwnProperty("STATUS"))
					{
						if(item["STATUS"] == "complete")
						{
							setStyle('color', "green");
						}
						if(item["STATUS"] == "important")
						{
							setStyle('color', "red");
						}
						if(item["STATUS"] == "billed")
						{
							setStyle('color', "yellow");
						}
					}
				}
				// setStyle('fontWeight', DataGrid(listData.owner).dataProvider[listData.rowIndex].fontWeight);
				// setStyle('color', DataGrid(listData.owner).dataProvider[listData.rowIndex].fontWeight);
			}
			super.validateNow();
		}
	}
}